$(document).ready(function (){
    $(".nav-menu").each(function (){
        $(this).children(".nav-content").hide();
    });
    $(".nav-title").each(function (){
        $(this).click(function (){
            var conEle = $(this).parent(".nav-menu").children(".nav-content");
            if(conEle.css("display")!="none")
            {
                conEle.hide(500);
            }else{
                var navEle = conEle.parents(".nav-menu");
                var other = navEle.siblings();
                other.each(function ()
                {
                    $(this).children(".nav-content").hide(500);
                })
                conEle.show(500);
            }
        })
    });
});
new Vue({
    el: '#content',
    data() {
        return {
            defAct: '2',
            menuActived: '2',
            iframeUrl: './PAGES/1.html',
            loading:false,
            currentPage:'花卉列表'
        }
    },
    computed: {},
    created() {

    },
    beforeDestroy() {

    },
    mounted() {
    },
    methods: {
        //  由此页面路由,这里是点击左侧菜单栏更换右侧子页面的函数
        menuHandle(url,pageName) {
            this.iframeUrl = url
            this.currentPage = pageName;
        },
        //  退出
        loginout(){
            this.$confirm('是否退出登陆?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                api("/user/outlogin","get",
                    function (){
                        localStorage.removeItem("token");
                        window.location.replace("../index.html");
                    })
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消'
                });
            });
        }
    }
})